package code

type Response struct {
	Code int32  `json:"code"`
	Msg  string `json:"message,omitempty"`
}

type response struct {
	Response
	Data any `json:"data,omitempty"`
}

func (r *response) SetCode(code int32) {
	r.Code = code
}

func (r *response) SetMsg(msg string) {
	r.Msg = msg
}

func (r *response) SetData(data interface{}) {
	r.Data = data
}

func (r response) Clone() Responses {
	return &r
}
